package com.killer.com.killer.config;

import com.killer.filter.MySentinelWebFluxFilter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.annotation.Order;
import org.springframework.web.server.WebFilter;

@Configuration
public class SentinelConfig {

    /**
     * 自定义Sentinel过滤器,进行url清洗，处理restful风格的接口
     * @return
     */
    @Bean
    @Order(-2)
    public WebFilter sentinelWebFluxFilter() {
        return new MySentinelWebFluxFilter();
    }
}
